package 抽象类.抽象类特性.抽象类必须被继承;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 姚东名
 * Date: 2024-06-18
 * Time: 16:27
 */
public class Triangle extends Shape {
    private double a;
    private double b;
    private double c;
    @Override
    public void draw() {
        System.out.println("三角形：a = " + this.a + " b = " + this.b + " c = " + this.c);
    }

    //三角形：直角三角形、等腰三角形等，还可以继续细化
    @Override
    void calcArea() {
        //// 编译失败：要么实现该抽象方法，要么将三角形设计为抽象类
    }
}
